#ifndef __USER_BSP_H
#define __USER_BSP_H

#include "stm32g4xx_hal.h"
#include "adc.h"
#include "rtc.h"
#include "control.h"

struct Data_Typedef{
	float adc_volt;
	uint32_t freq_get1;
	uint32_t freq_Value_A;
	
	int temperature;
	int temper_b;
	float temper_k;
	int8_t temp_max;
	
	int humi;
	float humi_m;
	float humi_n;
	int humi_max;
	
	uint16_t pwm_F;
	uint8_t pwm_duty;
	
	
};
extern struct Data_Typedef data;

struct Tick_TypeDef{
	uint32_t adc;
	uint32_t lcd;
	uint32_t rtc;
	uint32_t pwm;
	uint32_t key;
	uint32_t led;
	uint32_t eep;
	uint32_t rxd;
};
extern struct Tick_TypeDef tick;

struct Key_TypeDef{
	uint8_t value;
	uint8_t old;
	uint8_t down;
	uint8_t up;
};
extern struct Key_TypeDef key;

extern RTC_TimeTypeDef RTC_Time;
extern RTC_DateTypeDef RTC_Data;
extern RTC_TimeTypeDef RTC_Time_TX[70];


void LED_Disp(unsigned char led_state);
void ADC_Proc(void);
void RTC_TimeGet(void);
void Key_Read(void);


#endif
